package com.yumingjiang.acs;

import com.yumingjiang.api.model.user.UserModel;
import com.yumingjiang.api.userserivce.UserServiceFacade;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@EnableDubbo
@RestController
@RequestMapping("/main")
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, RedisAutoConfiguration.class})
public class AcsApplication {
	public static void main(String[] args) {
		SpringApplication.run(AcsApplication.class, args);
	}

	@DubboReference
	private UserServiceFacade userServiceFacade;

	@GetMapping("/uq")
	public UserModel queryUser(){
		return userServiceFacade.queryUser("test");
	}
}
